﻿namespace com.stifel.Exceptions.SharePointExceptions
{
    using System;

    using Microsoft.SharePoint;

    [Serializable]
    public class InvalidFieldTypeException : Exception
    {
        #region Constructors

        public InvalidFieldTypeException( )
            : base("The specified field is not of the specified field type.")
        {
        }

        public InvalidFieldTypeException( string internalName )
            : base(string.Format( "The specified field '{0}' is not of the specified field type.", internalName ))
        {
        }

        public InvalidFieldTypeException( string internalName, SPFieldType type )
            : base(string.Format( "The specified field '{0}' is not of the specified field type '{1}'.", internalName, type.ToString( ) ))
        {
        }

        #endregion Constructors
    }
}